<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnExecutorTypeInTask extends AbstractMigration
{
    public function up()
    {
        $this->table('task')
            ->addColumn('executor_type', 'enum', ['after' => 'executor', 'values' => 'default,inside,outside,tenant_group', 'default' => 'default', 'comment' => '执行人类型:default默认,inside内部,outside外部,tenant_group集团'])
            ->save();
    }

    public function down()
    {
        $this->table('task')
            ->removeColumn('executor_type')
            ->save();
    }
}
